<?php

namespace app\admin\controller;

use app\common\model\Users;
use think\Controller;
use think\Request;
use utils\Result;

class User extends Common
{
    public function index()
    {
        $this->AuthCheck();
        if ($this->request->isPost()) {
            $limit = input('limit');
            $page = input('page');
            $list = Users::page($page, $limit)->select();
            $count = Users::count();
            return Result::layui($list, $count);
        }
        return $this->fetch();
    }
}
